namespace Cos.Core.NHibernate.Mapping
{
    #region Usings

    using FluentNHibernate.Mapping;

    #endregion

    public class SubmissionMap : ClassMap<SubmissionDataModel>
    {
        public SubmissionMap()
        {
            this.Table("Submission");
            this.LazyLoad();
            this.Id(x => x.Id).GeneratedBy.Native().Column("ID");

            this.Map(x => x.CultureCode).Column("Culture_Code");
            this.Map(x => x.FormId).Not.Nullable().Column("Form_ID");
            this.Map(x => x.SubmissionDate).Not.Nullable().Column("Submission_Date");
            this.Map(x => x.IP).Column("IP");
            this.Map(x => x.UserAgent).Column("User_Agent");
            this.Map(x => x.ReferenceUrl).Column("Reference_URL");
            this.Map(x => x.PageUrl).Column("Page_URL");
            this.Map(x => x.Email).Column("Email");
            this.Map(x => x.UserPKID).Column("UserPKID");
            this.Map(x => x.UserName).Column("UserName");
            //HasMany(x => x.SubmissionValues).Not.KeyNullable().KeyColumn("Submission_ID");
        }
    }
}